package com.kk.factory.abstractfactory;

/**
 * @author 王志强
 * @date 2021-12-10
 */
public class BJFactory implements IFactory {

    @Override
    public AbstractPizza createPizza(String type) {
        AbstractPizza pizza = null;
        if ("cheese".equals(type)) {
            pizza = new BJCheesePizza();
        } else {
            System.out.println("北京没有pizza: " + type);
        }
        return pizza;
    }
}
